import api from "@/util/api";

//查询订单项的商品
async function getOrderItem(orderId) {
    // 检查orderId是否有效
    if (!orderId) {
        return Promise.reject(new Error("订单ID不能为空"));
    }
    
    let resp = await api({
        url: "/order-api/api/v1/orderItem/findByOrderId/" + orderId,
        method: "get"
    });
    return resp;
}

export {getOrderItem};